public class Iteawhile {

	public static void main(String[] args) {
		int i = 0;
		int sum=0;
		while (sum < 1000) {
			System.out.println(i);
			i++;
			sum += i;
			System.out.println(sum);
		}
	}
}